﻿using System.Collections;
using System.Collections.Generic;
using yiCommerce.Core.Domain.Products;

namespace yiCommerce.Service.Products
{
    public interface IProductService
    {
        void DeleteProduct(int productId);

        Product GetProductById(int productId);

        IList<Product> GetAllProducts();

        IList<Product> GetAllProductsByShopPid(int shopId);

        void InsertProduct(Product product);
        void UpdateProduct(Product product);


        ProductInfoInsertResult InsertProductInfo(ProductInfoInsertRequest productInfoInsertRequest);
        ProductInfoUpdateResult UpdateProductInfo(ProductInfoUpdateRequest productInfoUpdateRequest);



        ProductVariant GetProductVariantById(int productVariantId);

        ProductVariant GetProductVariantBySku(string sku);

        int InsertProductVariantInfo(int productId, string name, string sku, decimal price, int displayOrder, int stockQuantity, int pictureId, bool published);
        void UpdateProductVariantInfo(int productVariantId, string name, string sku, decimal price, int displayOrder, int stockQuantity, int pictureId, bool published);

        IList<ProductVariant> GetProductVariantsByProductId(int productId);

        void DeleteProductVariant(ProductVariant productVariant);
        void AdjustInventory(ProductVariant productVariant, bool decrease,
           int quantity, string attributesXml);

        IList<ProductAttribute> GetAllProductAttributes();
        int InsertProductVariantAttribute(int pvId, AttributeControlType selectedAttributeType,int selectedProductAttributeId);

        IList<SpecificationAttribute> GetAllSpecificationAttribute();
        void InsertProductSpecificationAttribute(int productId, int specificationAttributeOptionId);


        int InsertProductPicture(int productId, int pictureId, int displayOrder);

        IList<ProductVariantAttribute> GetProductVariantAttributesByProductVariantId(int productVariantId);
        ProductVariantAttribute GetProductVariantAttributeByProductVariantAttributeId(int productVariantAttributeId);
        int InsertProductVariantAttributeValue(int productVariantAttributeId, string productVariantAttributeValue, int displayOrder);
        ProductVariantAttributeValue GetProductVariantAttributeValueByProductVariantAttributeValueId(int productVariantAttributeValueId);
        void DeleteProductVaraintAttribute(int productvariantattributeId);
        void DeleteProductVaraint(int productVariantId);
        void DeleteProductVaraintAttributeValue(int productvariantattributeValueId);
        void DeleteProductPicture(int productPictureId);
    }
}